package com.itheima.tliaswebmanagement.mapper;

import com.itheima.tliaswebmanagement.anno.LogOperator;
import com.itheima.tliaswebmanagement.pojo.dto.EmpPageQueryDTO;
import com.itheima.tliaswebmanagement.pojo.entity.Emp;
import com.itheima.tliaswebmanagement.pojo.vo.EmpVO;
import com.itheima.tliaswebmanagement.pojo.vo.JobCountVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @Description EmpMapper
 * @Author ziguan ling
 * @Date 2025--01--06
 */
@Mapper
public interface EmpMapper {
    //    @Select("select e.*, d.name as deptName from emp as e  left join dept as d on e.dept_id = d.id limit #{page}, #{pageSize};")
//    @Select("select e.*, d.name as deptName from emp as e  left join dept as d on e.dept_id = d.id ")
    List<EmpVO> pageQuery(EmpPageQueryDTO empPageQueryDTO);

    //    @Select("select count(*) from emp;")
//    Long count(EmpPageQueryDTO empPageQueryDTO);
    @LogOperator
    void insertEmp(Emp emp);

    List<JobCountVO> empJobData();


    Emp getLoginInfo_d(Emp emp);

    EmpVO queryById_d(Integer id);

    List<Emp> queryAll_d();

    @LogOperator
    void update_d(Emp updateEmp);

    void removeBatch_d(List<Integer> ids);

    List<Map> empGenderData_d();

    List<Map> studentDegreeData_d();
}
